//
//  GameBlock.h
//  DualSnake
//
//  Created by HacJune Lee on 13. 12. 6..
//  Copyright (c) 2013년 HakJune Lee. All rights reserved.
//

#import <Foundation/Foundation.h>

enum GAME_BLOCK_TYPE {
    GAMEBLOCK_SNAKE,
    GAMEBLOCK_SNAKE_HEAD,
    GAMEBLOCK_SNAKE_BODY,
    GAMEBLOCK_WALL,
    GAMEBLOCK_GEM,
    GAMEBLOCK_ITEM
};

@protocol GameBlockProtocol <NSObject>
@optional
-(void)deleteItemWithSelf:(id)self;
@end

@interface GameBlock : NSObject

@property CGPoint drawPoint;
@property float drawWidth;
@property int gameBlockType;
@property int visibleMilliSec;
@property int gridNum;
@property int beforeGridNum;
@property int nextDirection;

@property id<GameBlockProtocol> delegate;

@property (nonatomic, strong) UIImage * drawImage;

-(id)initWithBlockType:(int)gameBlock;
-(void)settingWithImage:(UIImage*)drawImage drawPoint:(CGPoint)drawPoint;
-(void)settingWithImage:(UIImage*)drawImage gridNum:(int)gridNum;

-(void)resetDrawPoint;
-(void)drawGameblock;

@end
